/**
 * Copyright (C) 2018-2019
 * All rights reserved, Designed By www.joolun.com
 */
import request from '@/utils/request'

export function getCate(params) {
  return request({
    url: '/cate/page',
    method: 'get',
    params 
  })
} 

// 查询分类列表
export function listCate(query) {
  return request({
    url: '/cate/list',
    method: 'get',
    params: query
  })
}

// 查询分类详细
export function getCateById(id) {
  return request({
    url: '/cate/' + id,
    method: 'get'
  })
}

// 新增分类
export function addCate(data) {
  return request({
    url: '/cate',
    method: 'post',
    data: data
  })
}

// 修改分类
export function updateCate(data) {
  return request({
    url: '/cate',
    method: 'put',
    data: data
  })
}

// 删除分类
export function delCate(id) {
  return request({
    url: '/cate/' + id,
    method: 'delete'
  })
}

// 导出分类
export function exportCate(query) {
  return request({
    url: '/cate/export',
    method: 'get',
    params: query
  })
}